Method and device for arithmetic encoding or arithmetic decoding

ABSTRACT

The invention proposes a method and a device for arithmetic encoding of a current spectral coefficient using preceding spectral coefficients. Said preceding spectral coefficients are already encoded and both, said preceding and current spectral coefficients, are comprised in one or more quantized spectra resulting from quantizing time-frequency-transform of video, audio or speech signal sample values. 
     Said method comprises processing the preceding spectral coefficients, using the processed preceding spectral coefficients for determining a context class being one of at least two different context classes, using the determined context class and a mapping from the at least two different context classes to at least two different probability density functions for determining the probability density function, and arithmetic encoding the current spectral coefficient based on the determined probability density function wherein processing the preceding spectral coefficients comprises non-uniformly quantizing absolutes of the preceding spectral coefficients for use in determining of the context class.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is division of U.S. patent application Ser. No.15/952,082, filed Apr. 12, 2018, which is division of U.S. patentapplication Ser. No. 14/924,156, filed Oct. 27, 2015, now U.S. Pat. No.9,973,208, which is continuation of Ser. No. 13/500,106, filed Apr. 4,2012, now U.S. Pat. No. 9,219,498, which is U.S. National Stage ofPCT/EP2010/064644, filed Oct. 1, 2010, which claims priority to EuropeanApplication No. 09305961.6, filed Oct. 9, 2009, each of which isincorporated by reference in its entirety.

TECHNICAL FIELD

The invention is related to arithmetic encoding and decoding ofmultimedia data.

BACKGROUND OF THE INVENTION

Arithmetic coding is a method for lossless compression of data.Arithmetic coding is based on a probability density function (PDF). Forachieving a compression effect, the probability density function onwhich the coding is based has to be identical to or at leastresemble—the closer the better—the actual probability density functionwhich the data actually follows.

If arithmetic coding is based on a suitable probability densityfunction, it may achieve significant compression resulting in at leastalmost optimal code. Therefore, arithmetic coding is a frequently usedtechnique in audio, speech or video coding for encoding and decoding ofcoefficient sequences wherein coefficients are quantizedtime-frequency-transform of video pixels or audio or speech signalsample values in binary representation.

For even improving compression, arithmetic coding may be based on a setof probability density functions, wherein the probability densityfunction used for coding a current coefficient depends on a context ofsaid current coefficient. That is, different probability densityfunctions may be used for coding of a same quantization value independency on a context in which the coefficient having said samequantization value appears. The context of a coefficient is defined bythe quantization values of coefficients comprised in a neighbourhood ofone or more neighbouring coefficients neighbouring the respectivecoefficient, e.g. a subsequence of one or more already encoded oralready decoded coefficients adjacently preceding, in a sequence, therespective coefficient to-be-encoded or to-be-decoded. Each of thedifferent possible appearances the neighbourhood may take defines adifferent possible context each being mapped onto an associatedprobability density function.

In practice, said compression improvement becomes manifest only if theneighbourhood is sufficiently large. This comes along with a combinatoryexplosion of the number of different possible contexts as well as acorresponding huge number of possible probability density functions or acorrespondingly complex mapping.

An example of a context based arithmetic coding scheme can be found inISO/IEC JTC1/SC29/WG11 N10215, October 2008, Busan, Korea, proposing areference model for Unified Speech and Audio Coding (USAC). According tothe proposal, 4-tupels already decoded are considered for context.

Another example of a USAC related context based arithmetic coding can befound in ISO/IEC JTC1/SC29/WG11 N10847, July 2009, London, UK.

For complexity reduction in high order conditional entropy encoding,U.S. Pat. No. 5,298,896 proposes non-uniform quantization ofconditioning symbols.

SUMMARY OF THE INVENTION

Corresponding to the tremendous number of contexts to-be-handled thereare a tremendous number of probability density functions which need tobe stored, retrieved, and handled or at least a correspondingly complexmapping from contexts to probability density functions. This increasesat least one of encoding/decoding latency and memory capacityrequirements. There is a need in the art for an alternative solutionallowing to achieving compression similarly well while decreasing atleast one of encoding/decoding latency and memory capacity requirements.

Said method for arithmetic encoding, or decoding, respectively, usespreceding spectral coefficients for arithmetic encoding or decoding,respectively, of a current spectral coefficient, wherein said precedingspectral coefficients are already encoded, or decoded, respectively.Both, said preceding spectral coefficients and said current spectralcoefficient, are comprised in one or more quantized spectra resultingfrom quantizing time-frequency-transform of video, audio or speechsignal sample values. Said method further comprises processing thepreceding spectral coefficients, using the processed preceding spectralcoefficients for determining a context class being one of at least twodifferent context classes, using the determined context class and amapping from the at least two different context classes to at least twodifferent probability density functions for determining the probabilitydensity function, and arithmetic encoding, or decoding, respectively,the current spectral coefficient based on the determined probabilitydensity function. It is a feature of the method that processing thepreceding spectral coefficients comprises non-uniformly quantizingabsolutes of the preceding spectral coefficients.

The use of context classes as alternative to contexts for determiningthe probability density function allows for grouping two or moredifferent contexts which result into different but very similarprobability density functions into a single context class being mappedonto a single probability density function. The grouping is achieved byusing non-uniformly quantized absolutes of preceding spectralcoefficients for determining the context class.

For instance, there is an embodiment in which processing the precedingspectral coefficients comprises determining a sum of quantized absolutesof the preceding spectral coefficients for use in determining thecontext class. Similarly, there is a corresponding embodiment of thedevice for arithmetic encoding as well as a corresponding embodiment ofthe device for arithmetic decoding in which the processing means areadapted for determining a sum of quantized absolutes of the precedingspectral coefficients for use in determination of the context class.

In further embodiments of the devices, the processing means are adaptedsuch that processing the preceding spectral coefficients furthercomprises a first quantization in which the absolutes of the precedingspectral coefficients are quantized according a first quantizationscheme, a variance determination in which variance of the absolutes ofthe preceding spectral coefficients quantized according the firstquantization scheme is determined, usage of the determined variance forselection of one of at least two different non-linear secondquantization schemes, and a second quantization in which the absolutesof the preceding spectral coefficients quantized according the firstquantization scheme are further quantized according to the selectednon-linear second quantization scheme. Further embodiments of themethods comprise corresponding steps.

Variance determination may comprise determination of a sum of theabsolutes of the preceding spectral coefficients quantized according thefirst quantization scheme and comparison of the determined sum with atleast one threshold.

In further embodiments, the processing means of each of the devices maybe adapted such that processing either results in a first outcome or atleast a different second outcome. Then, determination of the contextclass further comprises determination of a number of those precedingspectral coefficients for which processing resulted in the firstoutcome, and usage of the determined number for determination of thecontext class.

Each of the devices may comprise means for receiving at least one of amode switching signal and a reset signal wherein devices are adapted forusing the at least one received signal for controlling the determinationof the context class.

The at least two different probability density functions may bedetermined beforehand using a representative set of data for determiningthe at least two different probability density functions and the mappingmay be realized using a look-up table or a hash table.

In an embodiment, a method for arithmetic decoding of a current spectralcoefficient may include processing preceding spectral coefficients,determining a context state based on the processed preceding spectralcoefficients. The context state may be determined from at least twodifferent context states, and may be based on a sum of the quantisedabsolutes of the preceding spectral coefficients. The method may includedetermining a probability density function based on the determinedcontext state and a mapping from the at least two different contextstates to at least two different probability density functions andarithmetic decoding the current spectral coefficient based on thedetermined probability density function.

The processing of the preceding spectral coefficients may comprisenon-uniformly de-quantising absolutes of the preceding spectralcoefficients for use in determination of the context state. Theprocessing of the preceding spectral coefficients may comprise a firstde-quantizing step in which the absolutes of the preceding spectralcoefficients are de-quantized according a first de-quantization scheme,a step of determining a variance of the absolutes of the precedingspectral coefficients de-quantized according the first de-quantizationscheme, a step of using the determined variance for selecting one of atleast two different nonlinear second de-quantization schemes, and asecond de-quantizing step in which the absolutes of the precedingspectral coefficients de-quantized according the first de-quantizationscheme are further de-quantized according to the selected nonlinearsecond de-quantization scheme.

The step of determining the variance of the absolutes of the precedingspectral coefficients de-quantized according the first de-quantizationscheme may comprise determining a sum of the absolutes of the precedingspectral coefficients de-quantized according the first de-quantizationscheme and comparing the determined sum with at least one threshold.

The processing either results in a first outcome or at least a differentsecond outcome and determining the context state further comprisesdetermining a number of preceding spectral coefficients beingnon-uniformly de-quantized to the first outcome, and using thedetermined number for determining the context state. One of thepreceding spectral coefficients may be preferred over the precedingspectral coefficients remaining, said method further comprises using thenon-uniformly de-quantization of the preferred one among the precedingspectral coefficient for determining the context state. Said preferredamong the preceding spectral coefficients is comprised in a precedingspectrum and said current spectral coefficient is comprised in adifferent current spectrum, said preferred preceding and said currentspectral coefficients being comprised at a same frequency in therespective spectrum.

In an embodiment, a method for arithmetic encoding of a current spectralcoefficient comprises processing preceding spectral coefficients. Themethod may further comprise using the processed preceding spectralcoefficients for determining a context state being one of at least twodifferent context states, using a sum of the quantised absolutes of thepreceding spectral coefficients for determination of the context state,using the determined context state and a mapping from the at least twodifferent context states to at least two different probability densityfunctions for determining the probability density function, andarithmetic encoding the current spectral coefficient based on thedetermined probability density function.

The processing of the preceding spectral coefficients may comprisenon-uniformly quantising absolutes of the preceding spectralcoefficients for use in determination of the context state. The methodmay further comprise inserting at least one of a mode switching signaland a reset signal and using the at least one inserted-signal forcontrolling the step of determining the context state. The method mayfurther comprise using a representative set of data for determining theat least two different probability density functions. The mapping may berealized using a look-up table or a hash table.

A non-transitory storage medium carrying arithmetic encoded spectralcoefficients arithmetic encoded according to the method discussed above.

A device for arithmetic decoding of a current spectral coefficient,including a processor configured to process the preceding spectralcoefficients. The device may further include a context classifierconfigured to determine a context state based on the processed precedingspectral coefficients. The context state may be determined from at leasttwo different context states. The context state may be based on a sum ofthe quantised absolutes of the preceding spectral coefficients. Thedevice may further include a context classifier that may be configuredto use a sum of the quantised absolutes of the preceding spectralcoefficients in determination of the context state. The device mayfurther include a probability density module that may be configured todetermine a probability density function. The probability density modulemay be adapted to use the determined context state and a mapping fromthe at least two different context states to at least two differentprobability density functions to determine the probability densityfunction. The device may further include an arithmetic decoderconfigured to arithmetically decode the current spectral coefficientbased on the determined probability density function.

The processor may be configured to process the preceding spectralcoefficients by non-uniformly de-quantising absolutes of the precedingspectral coefficients for use in determination of the context state. Theprocessor may be further be configured to process the preceding spectralcoefficients by de-quantizing the absolutes of the preceding spectralcoefficients according a first de-quantization scheme, determining avariance of the absolutes of the preceding spectral coefficientsde-quantized according the first de-quantization scheme, using thedetermined variance for selecting one of at least two differentnonlinear second de-quantization schemes, and further de-quantizing theabsolutes of the preceding spectral coefficients de-quantized accordingthe first de-quantization scheme according to a selected nonlinearsecond de-quantization scheme.

The processor may be configured to determine the variance of theabsolutes of the preceding spectral coefficients de-quantized accordingthe first de-quantization scheme by determining a sum of the absolutesof the preceding spectral coefficients de-quantized according the firstde-quantization scheme and comparing the determined sum with at leastone threshold.

The processor may further be configured to provide either a firstoutcome or at least a different second outcome and the contextclassifier is configured to determine the context state in response todetermining a number of preceding spectral coefficients beingnon-uniformly quantized to the first outcome, and use the determinednumber for determining the context class.

The processor may further be configured to prefer one of the precedingspectral coefficients over the preceding spectral coefficientsremaining, and the context classifier may be configured to use thenonuniformly de-quantization of the preferred one among the precedingspectral coefficient to determine the context state.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the invention are illustrated in the drawingsand are explained in more detail in the following description. Theexemplary embodiments are explained only for elucidating the invention,but not limiting the invention's scope and spirit defined in the claims.

In the figures:

FIG. 1 exemplarily depicts an embodiment of the inventive encoder;

FIG. 2 exemplarily depicts an embodiment of the inventive decoder;

FIG. 3 exemplarily depicts a first embodiment of a context classifierfor determining a context class;

FIG. 4 exemplarily depicts a second embodiment of a context classifierfor determining a context class;

FIG. 5a exemplarily depicts a first neighbourhood of preceding spectralbins preceding a current spectral bin to-be-encoded or to-be-decoded infrequency domain mode;

FIG. 5b exemplarily depicts a second neighbourhood of preceding spectralbins preceding a current spectral bin to-be-encoded or to-be-decoded inweighted linear prediction transform mode;

FIG. 6a exemplarily depicts a third neighbourhood of preceding spectralbins preceding a current lowest frequency spectral bin to-be-encoded orto-be-decoded in frequency domain mode;

FIG. 6b exemplarily depicts a fourth neighbourhood of preceding spectralbins preceding a current second lowest frequency spectral binto-be-encoded or to-be-decoded in frequency domain mode;

FIG. 7a exemplarily depicts a fifth neighbourhood of preceding spectralbins preceding a current lowest frequency spectral bin to-be-encoded orto-be-decoded in weighted linear prediction transform mode;

FIG. 7b exemplarily depicts a sixth neighbourhood of preceding spectralbins preceding a current second lowest frequency spectral binto-be-encoded or to-be-decoded in weighted linear prediction transformmode;

FIG. 7c exemplarily depicts a seventh neighbourhood of precedingspectral bins preceding a current third lowest frequency spectral binto-be-encoded or to-be-decoded in weighted linear prediction transformmode;

FIG. 7d exemplarily depicts an eighth neighbourhood of precedingspectral bins preceding a current third lowest frequency spectral binto-be-encoded or to-be-decoded in weighted linear prediction transformmode;

FIG. 8 exemplarily depicts neighbourhoods of different spectral binsto-be-encoded or to-be-decoded, said different spectral bin beingcomprised in a first spectrum to-be-encoded or to-be-decoded afterinitiation of encoding/decoding or occurrence of a reset signal infrequency domain mode; and

FIG. 9 exemplarily depicts further neighbourhoods of different spectralbins to-be-encoded or to-be-decoded in weighted linear predictiontransform mode, said different spectral bin being comprised in a secondspectrum to-be-encoded or to-be-decoded after initiation ofencoding/decoding or occurrence of a reset signal in weighted linearprediction transform mode.

EXEMPLARY EMBODIMENTS OF THE INVENTION

The invention may be realized on any electronic device comprising aprocessing device correspondingly adapted. For instance, the device forarithmetic decoding may be realized in a television, a mobile phone, ora personal computer, an mp3-player, a navigation system or a car audiosystem. The device for arithmetic encoding may be realized in a mobilephone, a personal computer, an active car navigation system, a digitalstill camera, a digital video camera or a Dictaphone, to name a few.

The exemplary embodiments described in the following are related toencoding and decoding of quantized spectral bins resulting fromquantization of time-frequency transform of multimedia samples.

The invention is based on the way the already transmitted quantizedspectral bins, e.g. preceding quantized spectral bins preceding acurrent quantized spectral bin BIN in a sequence, are used to determinethe probability density function PDF to be used for arithmetic encodingand decoding, respectively, of the current quantized spectral bin BIN.

The described exemplary embodiments of the methods and devices forarithmetic encoding or arithmetic decoding comprise several steps ormeans, respectively, for non-uniform quantization. All steps or means,respectively, together offer the highest coding efficiency, but eachstep or means, respectively, alone already realizes the inventiveconcept and provides advantages regarding encoding/decoding latencyand/or memory requirements. Therefore, the detailed description shall beconstrued as describing exemplary embodiments realizing only one of thesteps or means, respectively, described as well as describing exemplaryembodiments realizing combinations of two or more of the steps or meansdescribed.

A first step which may but need not to be comprised in an exemplaryembodiment of the method is a switching step in which it is decidedwhich general transform mode shall be used. For instance, in USACNoiseless Coding Scheme the general transform mode may be eitherFrequency Domain (FD) mode or weighted Linear Prediction Transform(wLPT) mode. Each general mode might use a different neighbourhood, i.e.a different selection of already encoded or decoded, respectively,spectral bins for the determination of the PDF.

After that, the context of a current spectral bin BIN may be determinedin module context generation COCL. From the determined context, acontext class is determined by classifying the context wherein, prior toclassification, the context is processed by preferably but notnecessarily non-uniform quantization NUQ1 of the spectral bins of thecontext. Classification may comprise estimating a variance VES of thecontext and comparing the variance with at least one threshold. Or, thevariance estimate is determined directly from the context. The varianceestimate is then used for controlling a further quantization NUQ2 whichis preferably but not necessarily non-linear.

In the encoding process exemplarily depicted in FIG. 1, a suitedprobability Density Function (PDF) is determined to encode the currentquantized spectral bin BIN. For this purpose only information can beused that is also already known at the decoder side. That is, onlypreceding encoded or decoded quantized spectral bins can be used. Thisis done in context classifier block COCL. There, selected precedingspectral bins define a neighbourhood NBH which is used to determine theactual context class. The context class may be symbolized by a contextclass number. The context class number is used to retrieve thecorresponding PDF from a PDF-memory MEM1 via a mapping MAP, e.g. via atable look-up or a hash table. The determination of the context classmay depend on a general mode switch GMS which allows to use differentneighbourhoods in dependence on the selected mode. As mentioned above,for USAC there may be two general modes (FD mode and wLPT mode). If ageneral mode switch GMS is realized at the encoder side, a mode changesignal or a current general signal has to be comprised in the bitstream,so that it is also known in the decoder. For instance, in the referencemodel for Unified Speech and Audio Coding (USAC) proposed by ISO/IECJTC1/SC29/WG11 N10847, July 2009, London, UK there are WD table 4.4core_mode and table 4.5 core_mode0/1 proposed for transmission of thegeneral mode.

After determination of a suitable PDF for encoding of the currentquantized spectral bin BIN by arithmetic encoder AEC, the currentquantized spectral bin BIN is fed to neighbourhood memory MEM2, i.e. thecurrent bin BIN becomes a preceding bin. The preceding spectral binscomprised in neighbourhood memory MEM2 may be used by block COCL forcoding the next spectral bin BIN. During, before or after memorizing thecurrent spectral bin BIN, said current bin BIN is arithmetic encoded byarithmetic encoder AEC. The output of arithmetic encoding AEC is storedin bit buffer BUF or is written in the bitstream directly.

The bitstream or the content of buffer BUF may be transmitted orbroadcasted via cable or satellite, for instance. Or, the arithmeticencoded spectral bins may be written on a storage medium like DVD, harddisc, blue-ray disk or the like. PDF-memory MEM1 and neighbourhoodmemory MEM2 may be realized in a single physical memory.

Reset switch RS may allow for restarting encoding or decoding from timeto time at dedicated frames at which the encoding and decoding may bestarted without knowledge of the preceding spectra, the dedicated framesbeing known as decoding entry points. If a rest switch RS is realized atthe encoder side, a reset signal has to be comprised in the bitstream,so that it is also known in the decoder. For instance, in the referencemodel for Unified Speech and Audio Coding (USAC) proposed by ISO/IECJTC1/SC29/WG11 N10847, July 2009, London, UK there is a arith_reset_flagin WD table 4.10 and table 4.14.

The corresponding neighbourhood based decoding scheme is exemplarilydepicted in FIG. 2. It comprises similar blocks as the encoding scheme.The determination of the PDF to be used for the arithmetic decoding isidentical with the encoding scheme to guarantee that in both, theencoder and decoder, the determined PDF is the same. The Arithmeticdecoding gets the Bits form the bit buffer BUF or the bitstream directlyand uses the determined PDF to decode the current quantized spectral binBIN. Afterwards the decoded quantized spectral bin is fed toneighbourhood memory MEM2 of the Determination of context class numberblock COCL and may be used for decoding the next spectral bin.

FIG. 3 exemplarily depicts a first embodiment of context classifier COCLfor determining a context class in detail.

Before storing current quantized spectral bin BIN in the spectra memoryMEM2 it may be non-uniformly quantized in block NUQ1. This has twoadvantages: first, it allows a more efficient storage of the quantizedbins, which are usually 16 Bit signed integer values. Second, the numberof values each quantized bin could have is reduced. This allows anenormous reduction of possible context classes in the context classdetermination process in block CLASS. Furthermore, as in the contextclass determination the sign of the quantized bins may be discarded, thecalculation of the absolute values may be included in the non-uniformquantization block NUQ1. In Table 1 is shown exemplary non-uniformquantization as it may be performed by block NUQ1. In the example, afternon-uniform quantization three different values are possible for eachbin. But in general, the only constraint for the non-uniformquantization is that it reduces the number of values a bin may take.

TABLE 1 Exemplary non-uniform quantization step including thecalculation of absolute values Absolute value of quantized spectra binsl0 1 2 3 4 5 6 7 8 ≥8 Non-uniform quantization 0 1 2

The non-uniform quantized/mapped spectral bins are stored in thespectral memory MEM2. According to the selected general mode selectionGMS, for the context class determination CLASS for each bin to be codeda selected neighbourhood NBH of spectral bins is selected.

FIG. 5a exemplarily depicts a first exemplary neighbourhood NBH of aspectral bin BIN to-be-encoded or to-be-decoded.

In this example only spectral bins of the actual or current spectrum(frame) and spectral bins of one preceding spectrum (frame) define theneighbourhood NBH. It is, of course, possible to use spectral bins frommore than one preceding spectrum as part of the neighbourhood, whichresults in a higher complexity, but may also offer a higher codingefficiency in the end. Note, from the actual spectrum only alreadytransmitted bins may be used to define the neighbourhood NBH, as theyalso have to be accessible at the decoder. Here as well as in thefollowing examples, the transmission order from low to high frequenciesfor the spectral bins is assumed.

The selected neighbourhood NBH is then used as input in the contextclass determination block COCL. In the following, first the general ideabehind the context class determination and a simplified version isexplained, before a special realization is described.

The general idea behind the context class determination is to allow areliable estimation of the variance of the bin to be coded. Thispredicted variance, again, can be used to get an estimation of the PDFof the bin to be coded. For variance estimation it is not necessary toevaluate the sign of the bins in the neighbourhood. Therefore, the signcan already be discarded in the quantization step before storage in thespectral memory MEM2. A very simple context class determination may looklike as follows: the neighbourhood NBH of spectral bin BIN may look likein FIG. 5a and consists of 7 spectral bins. If exemplarily thenon-uniform quantization shown in Table is used each bin can have 3values. This results in 3⁷=2187 possible context classes.

To further reduce this number of possible context classes the relativeposition of each bin in the neighbourhood NBH may be discarded.Therefore, only the number of bins is counted, which have the value 0, 1or 2, respectively, wherein, the sum of the number of 0-bins, the numberof 1-bins and the number of 2-bins equals the overall number of bins inthe neighbourhood, of course. In the neighbourhood NBH comprising n binsof which each may take one out of three different values there are0.5*(n²+3*n+2) context classes. For instance, in a neighbourhood of 7bins there are 36 possible context classes and a neighbourhood of 6 binsthere are 28 possible context classes.

A more complex but still quite simple context class determination takesinto account that research has shown the spectral bin of the precedingspectrum at the same frequency being of special importance (the spectralbin depicted by a dotted circle in the FIGS. 5a, 5b, 6a, 6b, 7a, 7b, 7c, 8 and 9). For the other bins in the neighbourhood, those depicted ashorizontally striped circles in the respective figures, the relativeposition is less relevant. So the bin at same frequency in the precedingspectrum is used explicitly for context class determination, whereas forthe other 6 bins only the number of 0-bins, the number of 1-bins and thenumber of 2-bins are counted. This results in 3×28=84 possible contextclasses. Experiments have shown that such context classification is veryefficient for the FD mode.

The context class determination may be extended by a variance estimationVES, which controls a second non-uniform quantization NUQ2. This allowsa better adaptation of the context class generation COCL to a higherdynamic range of the predicted variance of the bin to be coded. Thecorresponding block diagram of the extended context class determinationis exemplarily shown in 4.

In the example shown in FIG. 4, non-uniform quantization is separated intwo steps of which a preceding step provides finer quantization (blockNUQ1) and a subsequent step provides coarser quantization (block NUQ2).This allows for adaptation of the quantization to e.g. the variance ofthe neighbourhood. The variance of the neighbourhood is estimated in thevariance estimation block VES wherein the variance estimation is basedon said preceding finer quantization of bins in the neighbourhood NBH inblock NUQ1. The estimation of the variance need not to be precise butcan be very rough. For example, it is sufficient for USAC application todecide whether the sum of the absolute values of the bins in theneighbourhood NBH after said finer quantization meets or exceeds avariance threshold or not, that is, a switch between high and lowvariance is sufficient.

The 2-step non-uniform quantization may look as shown in Table 2. Inthis example the low variance mode corresponds to the 1-stepquantization shown in Table 2.

TABLE 2 Table 2 depicts an exemplary 2-step non-uniform quantization;the second or subsequent step quantizes differently in dependence onwhether variance has been estimated as being high or low Absolute valueof quantized spectral bins 0 1 2 3 4 5 6 7 8 ≥8 Finer quantization step1 (6 values) 0 1 2 3 4 5 Coarser quantization step 2 (low variance) 0 12 (3 values) Coarser quantization step 2 (high variance 0 1 2 (3 values)

The final context class determination in block CLASS is the same as inthe simplified version of FIG. 3. It is possible to use differentcontext class determinations according to the variance mode. It is alsopossible to use more than two variance modes, which of course results inan increase in the number of context classes and an increase incomplexity.

For the first bins in a spectrum a neighbourhood like it is shown inFIG. 5a or 5 b is not applicable, because for the first bins none or notall lower frequency bins exist. For each of these special cases an ownneighbourhood may be defined. In a further embodiment, the non-existingbins are filled with a predefined value. For the exemplary neighbourhoodgiven in FIG. 5 a the defined neighbourhoods for the first bins to betransmitted in a spectrum are shown in FIG. 6a and FIG. 6b . The idea isto expand the neighbourhood to higher frequency bins in order to allowfor using the same context class determination function as for the restof the spectrum. This means also the same context classes and at lastthe same PDFs can be used. This would not be possible, if the size ofthe neighbourhood is just reduced (of course this is also an option).

Resets usually occur before a new spectrum is coded. As alreadymentioned, this is necessary to allow dedicated starting points fordecoding. For example, if the decoding process shall start from acertain frame/spectrum, in fact the decoding process has to start fromthe point of the last reset to successively decode the preceding frameuntil the desired starting spectrum. This means, the more resets occur,the more entry points for the decoding exits. However, the codingefficiency is smaller in a spectrum after a reset.

After a reset occurred no preceding spectrum is available for theneighbourhood definition. This means only preceding spectral bins of theactual spectrum may be used in the neighbourhood. However, the generalprocedure may not be changed and the same “tools” can be used. Again,the first bins have to be treated differently as already explained inthe previous section.

In FIG. 8 an exemplary reset neighbourhood definition is shown. Thisdefinition may be used in case of reset in the FD mode of USAC.

The number of additional context classes as shown in the example in FIG.8 (using the quantization of Table with finally 3 possible quantizedvalues or 6 values if values after quantization step 1 are used) are asfollows: the handling for the very first bin adds 1 context class, 2ndbin adds 6 (value after quantization step 1 is used), 3rd bin adds 6 and4th bin adds 10 context classes. If additionally consider two (low andhigh) variance modes this number of context classes is almost doubled(only for the first bin, where no information is available and for thesecond bin, where the value for the bin after quantization step 1 isused are not doubled).

This results in this example in 1+6+2×6+2×10=39 additional contextclasses for the handling of the resets.

Mapping block MAP takes the context classification determined by blockCOCL, e.g. a determined context class number, and selects thecorresponding PDF from PDF-memory MEM1. In this step it is possible tofurther reduce the amount of necessary memory size, by using a singlePDF for more than one context class. That is, context classes which havea similar PDF may use a joint PDF. These PDFs may be predefined in atraining phase using a sufficiently large representative set of data.This training may include an optimization phase, where context classescorresponding to similar PDFs are identified and the corresponding PDFsare merged. Depending on the statistics of the data this can result in arather small number of PDFs which have to be stored in the memory. In anexemplary experiment version for USAC a mapping from 822 context classesto 64 PDFs was successfully applied.

The realization of this mapping function MAP may be a simple tablelook-up, if the number of context classes is not too large. If thenumber gets larger a hash table search may be applied for efficiencyreasons.

As stated above, general mode switch GMS allows for switching betweenfrequency domain mode (FD) and weighted linear prediction transform mode(wLPT). In dependency on the mode, different neighbourhoods may be used.The exemplary neighbourhoods depicted in FIG. 5a , FIGS. 6a and 6b andFIG. 8 has been shown in experiments as sufficiently large for FD mode.But for wLPT mode, larger neighbourhoods as exemplarily depicted in FIG.5b , FIGS. 7a, 7b and 7c and FIG. 9 has been found to be advantageous.

That is, exemplary reset handling in wLPT mode is depicted in FIG. 9.Exemplary neighbourhoods in wLPT mode for the lowest, the second lowest,the third lowest and the fourth lowest bin in a spectrum are depicted inFIGS. 7a, 7b, 7c and 7d , respectively. And, an exemplary neighbourhoodin wLPT mode for all other bins in a spectrum is depicted in FIG. 5 b.

The number of context classes resulting from the exemplary neighbourhooddepicted in FIG. 5b is 3×91=273 context classes. The factor 3 resultsfrom the special handling of the one bin at the same frequency as theone currently to-be-encoded or currently to-be-decoded. According to theformula given above, there are 0.5*((12*12)+3*12+2)=91 combinations ofnumber of bins with value 2, 1 or 0 for the remaining 12 bins in theneighbourhood. In an embodiment which differentiates context classes independency on whether variance of the neighbourhood meets or exceeds athreshold, the 273 context classes are doubled.

An exemplary reset handling as shown in FIG. 9 may also add a number ofcontext classes.

In a tested exemplary embodiment which yielded good results inexperiments, there are 822 possible context classes, which are brokendown in the following Table 1.

TABLE 1 Broken down possible context classes of the MPEG USAC CEproposal Low variance High variance Mode mode mode FD mode 84 84 FD modeafter 39 reset wLPT mode 273 273 wLPT mode 69 after reset

In a tested exemplary embodiment, these 822 possible context classes aremapped onto 64 PDFs. The mapping is determined in a training phase, asdescribed above.

The resulting 64 PDFs have to be stored in ROM tables e.g. in 16 Bitaccuracy for a fixpoint arithmetic coder. Here another advantage of theproposed scheme is revealed: in the current working draft version of theUSAC standardization mentioned in the background section, quadruples(vectors containing 4 spectral bins) are jointly coded with a singlecodeword. This results in very large codebooks even if the dynamic rangeof each component in the vector is very small (e.g. each component mayhave the values [−4, . . . , 3]→8⁴=4096 possible different vectors).Coding of scalars, however, allows a high dynamic range for each binwith a very small codebook. The codebook used in the tested exemplaryembodiment has 32 entries offering a dynamic range for the bin form −15to +15 and an Esc-codeword (for the case, that the value of a bin liesoutside this range). This means that only 64×32 16 Bit values have tostored in ROM tables.

Above, a method for arithmetic encoding of a current spectralcoefficient using preceding spectral coefficients has been describewherein said preceding spectral coefficients are already encoded andboth, said preceding and current spectral coefficients, are comprised inone or more quantized spectra resulting from quantizingtime-frequency-transform of video, audio or speech signal sample values.In an embodiment, said method comprises processing the precedingspectral coefficients, using the processed preceding spectralcoefficients for determining a context class being one of at least twodifferent context classes, using the determined context class and amapping from the at least two different context classes to at least twodifferent probability density functions for determining the probabilitydensity function, and arithmetic encoding the current spectralcoefficient based on the determined probability density function whereinprocessing the preceding spectral coefficients comprises non-uniformlyquantizing the preceding spectral coefficients.

In another exemplary embodiment, the device for arithmetic encoding of acurrent spectral coefficient using preceding, already encoded spectralcoefficients comprises processing means, first means for determining acontext class, a memory storing at least two different probabilitydensity functions, second means for retrieving the probability density,and an arithmetic encoder.

Then, the processing means are adapted for processing the preceding,already encoded spectral coefficients by non-uniformly quantizing themand said first means are adapted for using the processing result fordetermining the context class as being one of at least two differentcontext classes. The memory stores at least two different probabilitydensity functions and a mapping from the at least two different contextclasses to the at least two different probability density functionswhich allows for retrieving the probability density function whichcorresponds to the determined context class. The second means areadapted for retrieving, from the memory, the probability density whichcorresponds to the determined context class, and the arithmetic encoderis adapted for arithmetic encoding of the current spectral coefficientbased on the retrieved probability density function.

There is a corresponding another exemplary embodiment of the device forarithmetic decoding of a current spectral coefficient using preceding,already decoded spectral coefficients which comprises processing means,first means for determining a context class, a memory storing at leasttwo different probability density functions, second means for retrievingthe probability density, and an arithmetic decoder.

Then, the processing means are adapted for processing the preceding,already decoded spectral coefficients by non-uniformly quantizing themand said first means are adapted for using the processing result fordetermining the context class as being one of at least two differentcontext classes. The memory stores at least two different probabilitydensity functions and a mapping from the at least two different contextclasses to the at least two different probability density functionswhich allows for retrieving the probability density function whichcorresponds to the determined context class. The second means areadapted for retrieving, from the memory, the probability density whichcorresponds to the determined context class, and the arithmetic decoderis adapted for arithmetic decoding of the current spectral coefficientbased on the retrieved probability density function.

The invention claimed is:
 1. A method for arithmetic decoding of acurrent spectral coefficient, the method comprising: determining acontext state based on preceding spectral coefficients, wherein thecontext state is determined from at least two different context states,and wherein the context state is based on a sum of quantized absolutesof the preceding spectral coefficients; receiving a reset signal,wherein, in response to the reset signal, only preceding spectralcoefficients of current frame are used to determine the context state;determining a probability density function based on the context stateand a mapping from the at least two different context states to at leasttwo different probability density functions; and arithmetic decoding thecurrent spectral coefficient based on the probability density function.2. The method of claim 1, wherein processing the preceding spectralcoefficients comprises a first quantizing step in which the absolutes ofthe processed preceding spectral coefficients are quantized according afirst quantization scheme, a step of determining a variance of theabsolutes of the processed preceding spectral coefficients quantizedaccording the first quantization scheme, a step of using determinedvariance for selecting one of at least two different nonlinear secondquantization schemes, and a second quantizing step in which theabsolutes of the processed preceding spectral coefficients quantizedaccording the first quantization scheme are further quantized accordingto a selected nonlinear second quantization scheme.
 3. The method ofclaim 2, wherein the step of determining the variance of the absolutesof the processed preceding spectral coefficients quantized according thefirst quantization scheme comprises determining a sum of the absolutesof the processed preceding spectral coefficients quantized according thefirst quantization scheme and comparing the sum with at least onethreshold.
 4. A non-transitory storage medium for arithmetic decodingaccording to the method of claim
 1. 5. An apparatus for arithmeticdecoding of a current spectral coefficient, the apparatus comprising: acontext classifier configured to determine a context state based onpreceding spectral coefficients, wherein the context state is determinedfrom at least two different context states, and wherein the contextstate is based on a sum of quantized absolutes of the preceding spectralcoefficients, a receiver for receiving a reset signal, wherein thecontext classifier, in response to the reset signal, uses only precedingspectral coefficients of current frame to determine the context class; aprobability density module configured to determine a probability densityfunction, said probability density module being adapted to use adetermined context state and a mapping from the at least two differentcontext states to at least two different probability density functionsto determine the probability density function; and an arithmetic decoderconfigured to arithmetically decode the current spectral coefficientbased on the probability density function.
 6. The apparatus of claim 5,wherein a processor is configured to process the preceding spectralcoefficients by quantizing absolutes of the preceding spectralcoefficients according a first quantization scheme, determining avariance of the absolutes of the preceding spectral coefficientsquantized according the first quantization scheme, using a determinedvariance for selecting one of at least two different nonlinear secondquantization schemes, and further quantizing the absolutes of thepreceding spectral coefficients quantized according the firstquantization scheme according to a selected nonlinear secondquantization scheme.
 7. The apparatus of claim 6, wherein the processoris configured to determine the variance of the absolutes of thepreceding spectral coefficients quantized according the firstquantization scheme by determining a sum of the absolutes of thepreceding spectral coefficients quantized according the firstquantization scheme and comparing a determined sum with at least onethreshold.